package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import org.springframework.stereotype.Component;

import java.util.List;

@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@ToString
@Component
@TableName("role")
public class Role {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private String name;
    @TableField(exist = false)
    private List<RolePermission> rolePermissions;
}
